package org.zjvis.graph.analysis.service.dto;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import org.zjvis.graph.analysis.service.util.DozerUtil;
import org.zjvis.graph.analysis.service.vo.GraphFilterVO;

@Data
public class GraphFilterDTO extends BaseDTO {
    private Long id;

    private String name;

    private Long projectId;

    private Long graphId;

    private Long graphFilterPipelineId;

    private Integer type;

    private Integer subType;

    private Long parentId;

    private Long userId;

    private String dataJson;

    public GraphFilterVO view() {
        GraphFilterVO vo = DozerUtil.mapper(this, GraphFilterVO.class);
        vo.setData(JSONObject.parseObject(this.dataJson));
        return vo;
    }
}
